import React, { Component } from 'react'
// 事件定义方式有4种
// 支持传值的有2种
// 1.在`render`里调用方法的地方外面包一层箭头函数 
export default class App extends Component {
  handlerClick = (str, event) => {
    console.log(str)
    console.log(event)
  }
  render() {
    return (
      <div>
        <button onClick = {
          (event) => {
            this.handlerClick('aaaa', event)
          }
        }>传递参数</button>
      </div>
    )
  }
}
